<#include "/ftl/admin/common/_layout.html"/>
<@layout page_tab="topic">
<ol class="breadcrumb">
    <li><a href="/admin">首页</a></li>
    <li><a href="/admin/topic">话题</a></li>
    <li class="active">列表</li>
</ol>
<table class="table table-hover">
    <thead>
    <th>标题</th>
    <th>分类</th>
    <th>时间</th>
    <th>操作</th>
    </thead>
    <tbody>
    <#list page.getList() as topic>
        <tr>
            <td><a href="/topic/${topic.id!}.html" target="_blank">${topic.title!}</a></td>
            <td>
                <#if topic.tab="ask">
                    讨论
                <#elseif topic.tab="blog">
                    博客
                <#elseif topic.tab="code">
                    代码
                <#elseif topic.tab="job">
                    招聘
                </#if>
            </td>
            <td>${topic.in_time!}</td>
            <td>
                <a href="javascript:if(confirm('确定要删除吗？'))location='/admin/topic/delete/${topic.id!}'"><span class="glyphicon glyphicon-trash"></span></a>
            </td>
        </tr>
    </#list>
    </tbody>
</table>
<#include "/ftl/front/common/_paginate.html"/>
    <@paginate currentPage=page.pageNumber totalPage=page.totalPage actionUrl="/admin/topic/index" urlParas="" />
</@layout>
